<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<title><s:property value="#session.titleDesc"/></title>
<%@ include file="/common/meta.jsp"%>
</head>
<body>
<%@ include file="/common/center-top.jsp"%>	
<!-- 网页主显示区，填写表单 -->
<s:form action="/rule/rule!websiteList.action" name="mainForm" id="mainForm">
	<table class="tableFromBase" align="center" cellpadding="0" cellspacing="1">
		<tr>
			<td class="tdLabel">站点名称</td>
			<td class="tdInput"><s:textfield name="website.name"></s:textfield></td>
			<td class="tdLabel">是否可用</td>
			<td class="tdInput">
				<s:if test="website.dataStatus == 0">
					<input type="radio" name="website.dataStatus" value="-1" style="width:30px;"/>全部
					<input type="radio" name="website.dataStatus" checked="checked" value="0" style="width:30px;"/>可用
					<input type="radio" name="website.dataStatus" value="1" style="width:30px;"/>禁用
				</s:if>
				<s:elseif test="website.dataStatus == 1">
					<input type="radio" name="website.dataStatus" value="-1" style="width:30px;"/>全部
					<input type="radio" name="website.dataStatus" value="0" style="width:30px;"/>可用
					<input type="radio" name="website.dataStatus" checked="checked" value="1" style="width:30px;"/>禁用
				</s:elseif>
				<s:else>
					<input type="radio" name="website.dataStatus" checked="checked" value="-1" style="width:30px;"/>全部
					<input type="radio" name="website.dataStatus" value="0" style="width:30px;"/>可用
					<input type="radio" name="website.dataStatus" value="1" style="width:30px;"/>禁用
				</s:else>
			</td>
		</tr>
		<tr>
			<td class="tdLabel">站点网址</td>
			<td class="tdInput" colspan="3"><s:textarea name="website.url"></s:textarea></td>
		</tr>
		<tr>
			<td class="tdInput" colspan="4" align="center" style="text-align: center;">
				<img src="${ctp}/images/cx.gif" onclick="mainForm.submit();" style="cursor: pointer;"/>
			</td>
		</tr>
	</table>
</s:form>
<table class="tableList" cellspacing="1" cellspacing="0" cellpadding="0">
	<tr>
		<th>站点名称</th>
		<th>站点网址</th>
		<th>总类目</th>
		<th>未扫描</th>
		<th>扫描失败</th>
		<th>状态</th>
		<th>操作</th>
	</tr>
	<s:iterator value="websitePage.result" var="uvar">
		<tr>
			<td>${uvar.name}</td>
			<td>${uvar.url}</td>
			<td>${uvar.scanNum}</td>
			<td>${uvar.scanNumNo}</td>
			<td><font color="red">${uvar.scanNumFail}</font></td>
			<td>
				<s:if test="%{#uvar.dataStatus == 0}">已启用</s:if><s:else><span style="color:red;">已禁用</span></s:else>
			</td>
			<td>
				<a href="${ctp}/rule/rule!toEditWebsite.action?website.id=${uvar.id}">编辑站点</a>
				|
				<a href="${ctp}/rule/rule!toAddRule.action?website.id=${uvar.id}">增加规则</a>
				|
				<a href="${ctp}/rule/rule!ruleList.action?ruleVo.websiteId=${uvar.id}">查看规则</a>
				|
				<a href="${ctp}/rule/rule!toAddCategory.action?category.websiteId=${uvar.id}">增加类目</a>
				|
				<a href="${ctp}/rule/rule!categoryList.action?category.websiteId=${uvar.id}">查看类目</a>
				|
				<a href="${ctp}/rule/rule!startJobWebsite.action?website.id=${uvar.id}">扫描</a>
				|
				<a href="${ctp}/rule/rule!startJobWebsite.action?website.id=${uvar.id}&scanType=3">错误扫描</a>
			</td>
		</tr>
	</s:iterator>
</table>
<cus:page pageBean="websitePage" action="/rule/rule!websiteList.action" cssClass="scott" paramsKey="website.name,website.dataStatus,website.url"></cus:page>
<%@ include file="/common/center-down.jsp"%>				
</body>
</html>
